package com.gitee.dupe.authority.dto;

import com.gitee.dolt.model.RemoteData;
import com.gitee.dupe.authority.enumeration.UserStateEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @author LYH
 */
@Data
@ApiModel(value = "User编辑对象")
@Accessors(chain = true)
public class UserUpdateDTO implements Serializable {

    private static final long serialVersionUID = 4824605737454735704L;
    @NotNull
    @ApiModelProperty(value = "id")
    private Long id;

    @NotBlank
    @Length(min = 5, max = 50)
    @ApiModelProperty(value = "用户名", required = true)
    private String account;

    @ApiModelProperty(value = "手机号")
    @Length(max = 20)
    private String mobile;

    @ApiModelProperty(value = "邮箱")
    @Length(max = 255)
    private String email;

    @ApiModelProperty(value = "真实姓名", required = true)
    @Length(max = 50)
    @NotBlank
    private String realName;

    @ApiModelProperty(value = "头像")
    @Length(max = 255)
    private String avatar;

    @ApiModelProperty(value = "用户分类")
    @Length(max = 255)
    private String groups;

    @ApiModelProperty(value = "组织id")
    private RemoteData<Long, String> orgId;

    @ApiModelProperty(value = "部门")
    @Length(max = 255)
    private String department;

    @ApiModelProperty(value = "状态")
    private UserStateEnum state;

}
